Optimal. Leaf size=121 \[ -\frac {b \tanh (c+d x)}{d \left (a^2+b^2\right )}+\frac {a \text {sech}(c+d x)}{d \left (a^2+b^2\right )}+\frac {a^2 x}{b \left (a^2+b^2\right )}+\frac {b x}{a^2+b^2}+\frac {2 a^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b d \left (a^2+b^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2902, 2606, 8, 3473, 2735, 2660, 618, 204} \[ \frac {2 a^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b d \left (a^2+b^2\right )^{3/2}}-\frac {b \tanh (c+d x)}{d \left (a^2+b^2\right )}+\frac {a \text {sech}(c+d x)}{d \left (a^2+b^2\right )}+\frac {a^2 x}{b \left (a^2+b^2\right )}+\frac {b x}{a^2+b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 204
Rule 618
Rule 2606
Rule 2660
Rule 2735
Rule 2902
Rule 3473
Rubi steps
\begin {align*} \int \frac {\sinh (c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac {a \int \text {sech}(c+d x) \tanh (c+d x) \, dx}{a^2+b^2}+\frac {a^2 \int \frac {\sinh (c+d x)}{a+b \sinh (c+d x)} \, dx}{a^2+b^2}+\frac {b \int \tanh ^2(c+d x) \, dx}{a^2+b^2}\\ &=\frac {a^2 x}{b \left (a^2+b^2\right )}-\frac {b \tanh (c+d x)}{\left (a^2+b^2\right ) d}-\frac {a^3 \int \frac {1}{a+b \sinh (c+d x)} \, dx}{b \left (a^2+b^2\right )}+\frac {b \int 1 \, dx}{a^2+b^2}+\frac {a \operatorname {Subst}(\int 1 \, dx,x,\text {sech}(c+d x))}{\left (a^2+b^2\right ) d}\\ &=\frac {a^2 x}{b \left (a^2+b^2\right )}+\frac {b x}{a^2+b^2}+\frac {a \text {sech}(c+d x)}{\left (a^2+b^2\right ) d}-\frac {b \tanh (c+d x)}{\left (a^2+b^2\right ) d}+\frac {\left (2 i a^3\right ) \operatorname {Subst}\left (\int \frac {1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{b \left (a^2+b^2\right ) d}\\ &=\frac {a^2 x}{b \left (a^2+b^2\right )}+\frac {b x}{a^2+b^2}+\frac {a \text {sech}(c+d x)}{\left (a^2+b^2\right ) d}-\frac {b \tanh (c+d x)}{\left (a^2+b^2\right ) d}-\frac {\left (4 i a^3\right ) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{b \left (a^2+b^2\right ) d}\\ &=\frac {a^2 x}{b \left (a^2+b^2\right )}+\frac {b x}{a^2+b^2}+\frac {2 a^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b \left (a^2+b^2\right )^{3/2} d}+\frac {a \text {sech}(c+d x)}{\left (a^2+b^2\right ) d}-\frac {b \tanh (c+d x)}{\left (a^2+b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.46, size = 96, normalized size = 0.79 \[ \frac {\frac {\text {sech}(c+d x) (a-b \sinh (c+d x))}{a^2+b^2}+\frac {2 a^3 \tan ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )}{b \left (-a^2-b^2\right )^{3/2}}+\frac {c+d x}{b}}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 459, normalized size = 3.79 \[ \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d x \cosh \left (d x + c\right )^{2} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d x \sinh \left (d x + c\right )^{2} + 2 \, a^{2} b^{2} + 2 \, b^{4} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d x + {\left (a^{3} \cosh \left (d x + c\right )^{2} + 2 \, a^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{3} \sinh \left (d x + c\right )^{2} + a^{3}\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right ) + 2 \, {\left (a^{3} b + a b^{3}\right )} \cosh \left (d x + c\right ) + 2 \, {\left (a^{3} b + a b^{3} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d x \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.25, size = 135, normalized size = 1.12 \[ \frac {\frac {a^{3} \log \left (\frac {{\left | -2 \, b e^{\left (d x + 2 \, c\right )} - 2 \, a e^{c} - 2 \, \sqrt {a^{2} + b^{2}} e^{c} \right |}}{{\left | -2 \, b e^{\left (d x + 2 \, c\right )} - 2 \, a e^{c} + 2 \, \sqrt {a^{2} + b^{2}} e^{c} \right |}}\right )}{{\left (a^{2} b + b^{3}\right )} \sqrt {a^{2} + b^{2}}} + \frac {d x}{b} + \frac {2 \, {\left (a e^{\left (d x + c\right )} + b\right )}}{{\left (a^{2} + b^{2}\right )} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 158, normalized size = 1.31 \[ -\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d b}-\frac {2 a^{3} \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}-\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{d \left (a^{2}+b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {2 a}{d \left (a^{2}+b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 141, normalized size = 1.17 \[ -\frac {a^{3} \log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{2} b + b^{3}\right )} \sqrt {a^{2} + b^{2}} d} + \frac {2 \, {\left (a e^{\left (-d x - c\right )} - b\right )}}{{\left (a^{2} + b^{2} + {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}\right )} d} + \frac {d x + c}{b d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.00, size = 468, normalized size = 3.87 \[ \frac {\frac {2\,b}{d\,\left (a^2+b^2\right )}+\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2+b^2\right )}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}+\frac {x}{b}+\frac {2\,\mathrm {atan}\left (\left ({\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (\frac {2\,a^3}{b^3\,d\,\left (a^2\,b+b^3\right )\,\sqrt {a^6}\,\left (a^2+b^2\right )}+\frac {2\,\left (a\,b^3\,d\,\sqrt {a^6}+a^3\,b\,d\,\sqrt {a^6}\right )}{a^2\,b^2\,\left (a^2\,b+b^3\right )\,\sqrt {-b^2\,d^2\,{\left (a^2+b^2\right )}^3}\,\sqrt {-a^6\,b^2\,d^2-3\,a^4\,b^4\,d^2-3\,a^2\,b^6\,d^2-b^8\,d^2}}\right )-\frac {2\,\left (b^4\,d\,\sqrt {a^6}+a^2\,b^2\,d\,\sqrt {a^6}\right )}{a^2\,b^2\,\left (a^2\,b+b^3\right )\,\sqrt {-b^2\,d^2\,{\left (a^2+b^2\right )}^3}\,\sqrt {-a^6\,b^2\,d^2-3\,a^4\,b^4\,d^2-3\,a^2\,b^6\,d^2-b^8\,d^2}}\right )\,\left (\frac {b^4\,\sqrt {-a^6\,b^2\,d^2-3\,a^4\,b^4\,d^2-3\,a^2\,b^6\,d^2-b^8\,d^2}}{2}+\frac {a^2\,b^2\,\sqrt {-a^6\,b^2\,d^2-3\,a^4\,b^4\,d^2-3\,a^2\,b^6\,d^2-b^8\,d^2}}{2}\right )\right )\,\sqrt {a^6}}{\sqrt {-a^6\,b^2\,d^2-3\,a^4\,b^4\,d^2-3\,a^2\,b^6\,d^2-b^8\,d^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sinh {\left (c + d x \right )} \tanh ^{2}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________